package org.icop.frame.eval;

import java.util.Set;

import org.icop.model.ValuedCorrespondence;
import org.jbpt.graph.abs.IEdge;
import org.jbpt.graph.abs.IGraph;
import org.jbpt.hypergraph.abs.IVertex;

/**
 * Interface for an evaluator in the ICoP framework.
 * 
 * @author matthias weidlich
 *
 * @param <G>
 * @param <E>
 * @param <V>
 */
public interface Evaluator<G extends IGraph<E,V>, E extends IEdge<V>, V extends IVertex> {

	/**
	 * Returns a score (0 <= score <= 1) that indicates the quality of a given mapping
	 * between two graphs, higher is better. 
	 * 
	 * @param sg1 Mapped graph.
	 * @param sg2 Mapped graph.
	 * @param mapping Mapping such that for each (s1,s2) \in mapping: (s1,s2) \subseteq sg1.getVertices() \times sg2.getVertices().
	 * @return The quality of the mapping.
	 */
	public double evaluate(G sg1, G sg2, Set<ValuedCorrespondence<V>> mapping);
}
